[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VS_EatKeys()         Stops user from bypassing VALID clause w/PgDn

Description:

  VS_EatKeys() will "eat" the keys "PgDn" and "Ctrl-W" thus prohibiting
  your users from using these keys to bypass VALID clauses further down
  in a GET/READ.

Syntax:     

  ... VALID VS_EatKeys( @l_Eating )

Pass:       

  l_Eating is a logical expression that allows VS_EatKeys() to
  communicate with other calls to VS_EatKeys().

Return:     

  VS_EatKeys() will return a logical value of .T. and will stuff the
  keyboard with ASCII character 13 to skip to the next GET/VALID clause
  if the user tried to terminate the READ by pressing PgDn or Ctrl-W.,
  otherwise it will simply return .T.

Notes:      

  VERY IMPORTANT!!!

  If you are going to use VS_EatKeys() for one GET, you MUST use it for
  all GETs within the READ!!!  You can stack it in addition to your
  other VALID clauses using .AND., .OR. and .NOT.

Example:    

  l_Eating = .F.

  @ 05,10 SAY "Date: " GET d_Today VALID VS_EatKeys(@l_Eating)

  @ 10,10 SAY "Customer Code: " GET c_CustCode ;
   VALID GoodCode() .AND. VS_EatKeys(@l_Eating)

  @ 20,20 SAY "Something" GET c_SomeThing VALID VS_EatKeys(@l_Eating)

  READ

  ...
  ...

Usage:      

  VS_EatKeys() allows the programmer to ensure that every VALID clause
  is processed by disallowing the user to PgDn or Ctrl-W out of a READ.

See Also: VS_NoOther() VS_NotEmpty() VS_NotNeg() VS_NotPos() VS_NotZero()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson